#!/usr/bin/env python
#coding:utf-8

import cgi
import sqlite3
import cgitb;cgitb.enable()
import os

conn = sqlite3.connect("input.db")
curs = conn.cursor()

print "Laction: /wiki/add/list.py\n"
query = os.environ["QUERY_STRING"]
pairs = cgi.parse_qs(query)
for k, v in pairs.items():
    curs.execute("delete from address where %s=%s" % (k[0], v[0]))
conn.commit()
conn.close()
